package xiangmu1;
//实现接口
public class Prices  implements Qi,Qi1,Cz{
    //重写和注解
    @Override
    public void method(double monnys,int days) {
        if (days>0&&days<=7){
            monnys*=days;
        } else if (days>7&&days<=30){
            monnys*=0.9*days;
        }else if(days>30&&days<=150){
            monnys*=0.8*days;
        }else if(days>150){
            monnys*=0.7*days;
        }
        System.out.println("租车所产生的费用为："+monnys);
        User.setMonny(monnys);
    }
    //重写方法
    @Override
    public void method1(double monnys, int days) {
        if (days>0&&days<3){
            monnys*=days;
        } else if (days>=3&&days<7){
            monnys*=0.9*days;
        }else if(days>=7&&days<30){
            monnys*=0.8*days;
        }else if(days>=30&&days<150){
            monnys*=0.7*days;
        }else if (days>=150){
            monnys*=0.6*days;
        }
        System.out.println("租车所产生的费用为："+monnys);
        User.setMonny(monnys);
    }
    //重写方法
    @Override
    public void method2() {
        if (Jcar.getzMonny()>10000&&Jcar.getzMonny()<=30000){
            System.out.println("恭喜你成为初级会员");
        }else if(Jcar.getzMonny()>30000&&Jcar.getzMonny()<=50000){
            System.out.println("恭喜你成为中级会员");
        }else if (Jcar.getzMonny()>50000){
            System.out.println("恭喜你成为高级会员");
        }
    }
}

